<template>
  <div class="app-container">

    <el-table
      :data="tableData"
    >

      <el-table-column
        fixed
        prop="user.userLoginName"
        label="userName"
      >
      </el-table-column>

      <el-table-column
        sortable
        label="loginTime"
        height="100%">

        <template slot-scope="scope">
          {{scope.row.loginTime| dateFormat }}
        </template>

      </el-table-column>

      <el-table-column
        sortable
        label="expireTime"
        height="100%">

        <template slot-scope="scope">
          {{scope.row.expireTime| dateFormat }}
        </template>

      </el-table-column>

      <el-table-column

        prop="ipaddr"
        label="ipaddr"
        width="120">
      </el-table-column>

      <el-table-column
        prop="loginLocation"
        label="loginLocation"
        width="120">
      </el-table-column>

      <el-table-column
        prop="browserAndOs"
        label="browserAndOs"
        >
      </el-table-column>

      <el-table-column
        prop="token"
        label="token"
      >
      </el-table-column>

      <el-table-column
        prop="user.userEmail"
        label="email"
      >
      </el-table-column>

      <el-table-column
        prop="user.userPhone"
        label="userPhone"
      >
      </el-table-column>


    </el-table>


  </div>
</template>

<script>


import { userOnlineGet} from "@/api/system";

export default {
  name: "online",
  created() {
    this.getOperation()
  },
  methods: {
    getOperation(){
      userOnlineGet().then(
        res=>{
          this.$message({
            message: res.msg,
            type: 'success'
          })
          this.tableData = res.data;
        }
      )
    }
  },
  data() {
    return {
      tableData: []
    }
  },

}
</script>

<style scoped>


</style>
